package com.hex.liyue.commonmodule.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.hex.liyue.R;
import com.hex.liyue.commonmodule.utils.StatusBarCompatUtils;

import butterknife.Bind;
import butterknife.OnClick;

/**
 * Created by yukuo on 2016/5/15.
 * 这是一个单张图片浏览的界面
 */
public class PhotoBrowerActivity extends BaseActivity implements View.OnClickListener {
    @Bind(R.id.iv_photobrower_activity)
    ImageView ivPhotobrowerActivity;

    @Override
    protected void bindPresenter() {

    }

    @Override
    protected void initData(Bundle extras) {
        String url = extras.getString("url");
        Glide.with(this).load(url).centerCrop().into(ivPhotobrowerActivity);
    }

    @Override
    public int getContentLayout() {
        return R.layout.activity_photo_brower;
    }

    @Override
    protected void initToolbar() {
        StatusBarCompatUtils.compat(this);
    }

    @Override
    @OnClick({R.id.iv_photobrower_activity})
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.iv_photobrower_activity:
                onBackPressed();
                break;
        }
    }

}
